package gu.sql2java.excel.aspect.spring;

/**
 * {@link ReturnValueParser}默认实现
 * @author guyadong
 *
 */
public class ReturnValueParserDefaultImpl implements ReturnValueParser {

	@Override
	public void onError(Object returnValue, Exception e) throws Exception {
		throw e;
	}

	@Override
	public Object onGetParameter(Object returnValue, Object parameterValue) {
		return parameterValue;

	}

	@Override
	public ReturnInfo parse(ReturnInfo input) throws Exception {
		return input;
	}

	@Override
	public Class<?> getReturnType() {
		return Object.class;
	}

	public boolean isSuccess(Object returnValue) {
		return null != returnValue;
	}

}
